package com.zhuiyun.project.api.membershipRelationships.mapper;

import com.zhuiyun.project.api.memberUserManagement.model.MemberUserAndTypeModel;
import com.zhuiyun.project.api.membershipRelationships.entity.MembershipRelationships;
import org.mapstruct.Mapper;
/**
 * @ClassName MembershipRelationships
 * @Description TODO 会员用户会员记录持久层接口
 * @Author wx
 * @Date 2023/11/6 14:29
 **/
@Mapper
public interface MembershipRelationshipsMapper {

    /**
    * @Author wx
    * @Description 添加会员记录
    * @Date 2023/11/6 14:39
    * @Return
    * @param memberUserAndTypeModel
    */
    boolean addMemberUserShip(MemberUserAndTypeModel memberUserAndTypeModel);
    /**
     * @Author wx
     * @Description 修改会员记录
     * @Date 2023/11/6 14:39
     * @Return
     * @param memberUserAndTypeModel
     */
    boolean updateMemberUserShip(MemberUserAndTypeModel memberUserAndTypeModel);

    /**
    * @Author wx
    * @Description 查询会员卡可用次数
    * @Date 2023/12/28 8:37
    * @Return
    * @param id
    */
    MembershipRelationships upTimes(Integer id);

    /**
    * @Author wx
    * @Description 执行次数减一方法
    * @Date 2023/12/28 8:41
    * @Return
    * @param id
    */
    int reduceTimes(Integer id);
}
